<template>
  <div class="user-box">
    <van-image
      width="100%"
      src="http://liufusong.top:8080/img/profile/bg.png"
    />
    <div class="card">
      <div class="pic">
        <van-image
          width="100%"
          height="100%"
          src="http://liufusong.top:8080/img/profile/avatar.png"
        ></van-image>
      </div>
      <div class="main">
        <span>游客</span>
        <van-button type="primary">去登录</van-button>
      </div>
    </div>
    <van-grid :column-num="3" :border="false">
      <van-grid-item
        v-for="(item, index) in list"
        :key="index"
        :text="item.text"
      >
        <van-icon :name="item.icon" size="25px" />
        <label>{{ item.text }}</label>
      </van-grid-item>
    </van-grid>
    <div class="footer">
      <van-image
        width="100%"
        height="100%"
        src="http://liufusong.top:8080/img/profile/join.png"
      ></van-image>
    </div>
  </div>
</template>

<script>
export default {
  name: 'user-page',
  components: {},
  props: {},
  data() {
    return {
      list: [
        { icon: 'star-o', text: '我的收藏' },
        { icon: 'shop-o', text: '我的出租' },
        { icon: 'underway-o', text: '看房记录' },
        { icon: 'medal-o', text: '成为房主' },
        { icon: 'manager-o', text: '个人资料' },
        { icon: 'phone-circle-o', text: '联系我们' }
      ]
    }
  },
  computed: {},
  watch: {},
  created() {},
  methods: {}
}
</script>

<style scoped lang="less">
.user-box {
  .card {
    width: 320px;
    height: 165px;
    background-color: #fff;
    box-shadow: rgba(100, 100, 111, 0.2) 0px 7px 29px 0px;
    top: -40px;
    left: 27px;
    position: relative;
    padding-top: 40px;

    .pic {
      position: absolute;
      width: 65px;
      height: 65px;
      border-radius: 50%;
      box-shadow: rgba(0, 0, 0, 0.35) 0px 5px 15px;

      left: 50%;
      transform: translateX(-50%);
      top: -30px;
      border: 5px solid #f4f5f5;
    }
    .main {
      display: flex;
      flex-direction: column;
      align-items: center;
      .an-button {
        margin-top: 15px;
      }
    }
  }
  .footer {
    width: 345px;
    height: 80px;
    margin: 0 auto;
    background-color: red;
    margin-bottom: 25px;
  }
}
</style>
